package dhy.com.tomcat.oneToTwo.loader;

import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLStreamHandlerFactory;

/**
 * <P>
 *     用来加载./lib目录下的jar包
 * </P>
 * @author 大忽悠
 * @create 2022/3/6 15:04
 */
public class WebClassLoader extends URLClassLoader {
    public WebClassLoader(URL[] urls, ClassLoader parent) {
        super(urls, parent);
    }

    public WebClassLoader(URL[] urls) {
        super(urls);
    }

    public WebClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory) {
        super(urls, parent, factory);
    }

    /**
     * @param name
     * @return
     * @throws ClassNotFoundException
     */
    @Override
    protected Class<?> findClass(String name) throws ClassNotFoundException {
        return super.findClass(name);
    }
}
